<?php


 
session_start();
    $username=$_SESSION['username'];
 mysql_query("UPDATE `user` SET online='n', session='' WHERE name='$username'");
 unset($_SESSION['username']); 
     unset($_SESSION['password']); 
      unset($_SESSION['authority']); 
	   session_destroy();
	  
	header("location:../index.php");

?>